package demo;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class OrderInfo {

	static Map<String, String> paramMap = new HashMap<>();
	final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	
	static {
		paramMap.put("app_key", HttpRequest.APP_KEY);
		paramMap.put("app_secret", HttpRequest.APP_SECRET);
		paramMap.put("timestamp", sdf.format(new Date()));
		paramMap.put("method", "oms.OrderQueryInfo");
		paramMap.put("order_no", "7121100184353");
	}
	
	public static void main(String[] args) {
		paramMap.put("app_sign", HttpRequest.getSign(paramMap));
		String result = HttpRequest.sendPost("http://oms.ngmm365.com/oms/webservice.php/?method=oms.OrderQueryInfo", 
				HttpRequest.mapToString(paramMap));
		System.out.println(result);
	}
	
}
